home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / VISUALBA / DFVB19.ZIP / PBC-SUBS.DOC < prev    next >
Text File  |  1994-03-09  |  38KB  |  1,156 lines

  1.  
  2.  The following routines are available for your use. DoorFrame itself does not
  3. use most of the routines so you may retain or delete them from DFRAMEX.LIB as
  4. you see fit (the ones DoorFrame uses are noted - DON'T DELETE THEM!). The
  5. library is modularized so if you don't CALL a routine in your code, it will
  6. not be included in the final .EXE file. Since these routines come from the
  7. PBClone library by Tom Hanlin, I have taken the liberty of including his
  8. descriptions of the routines.
  9.  
  10. Name  : BigPrint             (Called by DoorFrame - DON'T DELETE!)
  11. Class : Display
  12. Level : BIOS
  13.  
  14. As the name suggests, this routine displays text in large
  15. characters.  How large?  Eight times as high and as wide as
  16. normal!  Each "big character" will be composed of many
  17. normal-sized characters.  You may choose the normal character
  18. used to create the big characters (the default is a CHR$(219)
  19. solid block character, if you pass a null string here).
  20.  
  21. You should avoid using CHR$(128) to CHR$(255) when in either of
  22. the CGA graphics modes, as many CGAs are unable to display
  23. these characters when in graphics mode.
  24.  
  25.  
  26.    BigPrint St$, FormCh$, Row%, Column%, Attr%
  27.  
  28. St$       string to display in big characters
  29. FormCh$   character used to compose the big characters
  30. Row%      starting row
  31. Column%   starting column
  32. Attr%     color/attribute of big characters (see CalcAttr)
  33.           NOTE: This is a local only procedure. It will NOT be sent to the
  34.                 remote computer!
  35.  
  36.  
  37. Name  : CalcAttr                (Called by DoorFrame - DON'T DELETE!)
  38. Class : Display
  39. Level : Any
  40.  
  41. An attribute is a combination of the foreground and background colors in a 
  42. format which is used by all types of displays when in text mode. 
  43.  
  44. Foreground colors are usually specified as 0-15, with backgrounds as 0-7.
  45.  
  46.    CalcAttr Foreground%, Background%, Attr%
  47.  
  48. Foreground%  foreground color
  49. Background%  background color
  50. -------
  51. Attr%        color "attribute"
  52.  
  53.  
  54. Name  : CalcDate             (Calculate Date)
  55. Class : Time
  56. Level : Any
  57.  
  58. This routine calculates what the date will be a given number of
  59. days from now, either in the past or the future.  Actually, you
  60. may use any starting date, not just the current date.  An error
  61. code is returned if the starting date or resulting date are not
  62. valid.  Dates may not preceed January 1, 1900.
  63.  
  64. CalcDate accepts the date in any standard form ("01/30/91" or
  65. "01-30-1991", for example) and returns its results in the same
  66. format.
  67.  
  68.    CalcDate StartDate$, Days&, Direction%, NewDate$, ErrCode%
  69.  
  70. StartDate$   starting date
  71. Days&        number of days from the current date (0 or more)
  72. Direction%   return future result (0) or past (nonzero)
  73. -------
  74. NewDate$     resulting date
  75. ErrCode%     whether the dates are valid (0 yes)
  76.  
  77.  
  78. Name  : CDROM
  79. Class : Disk / Equipment
  80. Level : DOS
  81.  
  82. This routine tells you whether the Microsoft CD-ROM Extensions are installed.
  83. If so, it tells you what the letter of the first CD-ROM logical drive is and
  84. how many logical drives exist.
  85.  
  86. Note: The CD-ROM installation check conflicts with the GRAPHICS.COM
  87. installation check for DOS 4.0, due to some screw-up at IBM or Microsoft.
  88. This may cause unexpected results.  I'm not yet sure whether DOS 5.0 is
  89. similarly afflicted.
  90.  
  91.    FirstDrive$ = "x"
  92.    CDROM FirstDrive$, Drives%
  93.  
  94. -------
  95. FirstDrive$   letter of the first logical drive (init to at least one space!)
  96. Drives%       number of logical drives available (0 if no CD-ROM is there)
  97.  
  98.  
  99. Name  : CheckDate            (Check Date validity)
  100. Class : Time
  101. Level : Any
  102.  
  103. This routine checks a date to see if it is valid.
  104.  
  105.    CheckDate MonthNr%, DayNr%, YearNr%, ErrCode%
  106.  
  107. MonthNr%     month number (1-12)
  108. DayNr%       day number (1-31)
  109. YearNr%      year number (1900 on; years <100 assumed 1900s)
  110. -------
  111. ErrCode%     whether the date is valid (0 yes)
  112.  
  113.  
  114. Name  : CheckShare           (Check for SHARE)
  115. Class : Disk
  116. Level : DOS
  117.  
  118. The CheckShare routine determines whether SHARE.EXE is active.
  119. This is particularly helpful before using the BASIC OPEN
  120. statement, which will fail if you request file sharing when
  121. it's not available.  The PBClone file routines handle such
  122. situations automatically, so CheckShare is not needed for them.
  123.  
  124.    CheckShare ShareActive%
  125.  
  126. -------
  127. ShareActive%   whether SHARE is active (0 if no)
  128.  
  129.  
  130. Name  : CheckShare2%         (Check for SHARE)
  131. Class : Disk
  132. Level : DOS
  133.  
  134. The CheckShare2% function determines whether SHARE.EXE is active.  This is
  135. particularly helpful before using the BASIC OPEN statement, which will fail
  136. if you request file sharing when it's not available.  The PBClone file
  137. routines handle such situations automatically, so CheckShare2% is not needed
  138. for them.
  139.  
  140.    ShareActive% = CheckShare2%
  141.  
  142. -------
  143. ShareActive%   whether SHARE is active (0 if no)
  144.  
  145. Name  : Cipher               (Cipher)
  146. Class : String
  147. Level : Any
  148.  
  149. This is a very simple text encryption routine.  It isn't
  150. particularly hard to crack, but will provide a basic level of
  151. security for undemanding applications.  The same routine can be
  152. used either to encrypt or decrypt text.  The original text may
  153. contain any character; likewise, the resulting text.  This is
  154. not well suited for use with sequential files-- if such is
  155. required, see CipherP.
  156.  
  157. I'd suggest using a long password composed of an unlikely
  158. string of characters, e.g. "#*@@!A^%x{.'".
  159.  
  160.    Cipher St$, Password$
  161.  
  162. St$        string to encrypt or decrypt
  163. Password$  password
  164. -------
  165. St$        encrypted or decrypted string
  166.  
  167.  
  168. Name  : CipherP              (Cipher Printable)
  169. Class : String
  170. Level : Any
  171.  
  172. This is a very simple text encryption routine.  It isn't
  173. particularly hard to crack, but will provide a basic level of
  174. security for undemanding applications.  The same routine can be
  175. used either to encrypt or decrypt text.  The original text may
  176. contain any character below CHR$(128), as may the password.
  177. The resulting text will be printable, if bizarre (all
  178. characters will be above CHR$(127)), and may be used with
  179. sequential files.
  180.  
  181. This routine is potentially less secure than the Cipher routine
  182. (see).
  183.  
  184. I'd suggest using a long password composed of an unlikely
  185. string of characters, e.g. "#*@@!A^%x{.'".
  186.  
  187.    CipherP St$, Password$
  188.  
  189. St$        string to encrypt or decrypt
  190. Password$  password
  191. -------
  192. St$        encrypted or decrypted string
  193.  
  194. Name  : DateA2R              (Date Actual to Relative)
  195. Class : Time
  196. Level : Any
  197.  
  198. This routine converts an actual date to a relative date,
  199. expressed as a number of days.  This allows you to compare
  200. dates, find out what the date will be in a given number of days
  201. (or what it was a given number of days ago), see how many days
  202. passed between two dates, and so forth.
  203.  
  204. I've frequently seen routines of this nature called "Julian
  205. date" routines. I'm not sure where that nomenclature
  206. originated, as it has nothing to do with the Julian calendar.
  207. Most of these routines rely on approximations through floating
  208. point math, and may or may not handle leap years and centuries
  209. appropriately.  The DateA2R routine takes no such shortcuts and
  210. may be relied upon to return accurate results.
  211.  
  212.    DateA2R MonthNr%, DayNr%, YearNr%, RelDate&
  213.  
  214. MonthNr%     month number (1-12)
  215. DayNr%       day number (1-31)
  216. YearNr%      year number (1900 on; years <100 assumed in 1900s)
  217. -------
  218. RelDate&     relative date
  219.  
  220.  
  221. Name  : DateN2S              (Date Numbers to String)
  222. Class : Time
  223. Level : Any / DOS
  224.  
  225. Many of the PBClone routines return the date as a set of
  226. numbers.  This routine provides an easy way to convert those
  227. numbers into string form.  The date format used (year length
  228. and delimiter) will be based on the string which you pass to
  229. the routine.  For instance, "xx-xx-xxxx" will return a date
  230. like "11-26-1990", whereas "xx.xx.xxxx" would return
  231. "11.26.1990", and "xx/xx/xx" would return "11/26/90".
  232.  
  233. If you pass zeroes for the MonthNr%, Day%, and Year% values,
  234. the current date will be returned in the format that you
  235. specified.
  236.  
  237. The ProBas and PBClone versions of this routine do not work the
  238. same way in regards to the y